<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2016/11/22 0022
 * Time: 上午 8:39
 */
header('Content-Type:text/html;charset=utf-8');
session_start();
if(isset($_GET['action']) && $_GET['action']=='logout'){
    unset($_SESSION['userinfo']);
    if(empty($_SESSION)){
        session_destroy();
    }
    header('Location: login.php');
    die;
}
if(isset($_SESSION['userinfo'])){
    $login = true;   
    $userinfo = $_SESSION['userinfo'];  
}else{
    $login = false;
}
define('APP','itcast');
require 'user_html.php';